package com.jblv.frame.common.fastdfs.image;

import org.apache.commons.lang3.StringUtils;

/**
 * @author happyonion.yangtao
 * @version 1.0
 * @title PicSize
 * @projectName jblv-frame
 * @packageName com.jblv.common.fastdfs.image
 * @description PicSize
 * @date Create at 2020/5/7 11:01
 * @since jdk1.8
 */

public class PicSize {
    private int width;
    private int height;
    private String name;

    public PicSize(int width, int height, String name) {
        this.width = width;
        this.height = height;
        if (StringUtils.isEmpty(name)) {
            this.setName("_" + width + "_" + height);
        } else {
            this.setName(name);
        }

    }

    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getWidth() {
        return this.width;
    }

    public void setWidth(int width) {
        this.width = width;
    }

    public int getHeight() {
        return this.height;
    }

    public void setHeight(int height) {
        this.height = height;
    }
}
